package com.hsgene.supplier.persistence;


import com.hsgene.supplier.condition.AgencyCondition;
import com.hsgene.supplier.domain.GeneticTestingAgency;
import com.hsgene.user.domain.GeneticTestingOperationAccount;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GeneticTestingAgencyMapper {
    int deleteByPrimaryKey(String id);

    int insert(GeneticTestingAgency record);

    int insertSelective(GeneticTestingAgency record);

    GeneticTestingAgency selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(GeneticTestingAgency record);

    int updateByPrimaryKey(GeneticTestingAgency record);
     /**
      *根据name查找
      * @author FX
      * @date 2018/10/17 11:44
      * @param name
      * @return
      */
    GeneticTestingAgency selectByName(String name);
    /**
     *获取列表总数
     * @author FX
     * @date 2018/10/17 13:53
     * @param condition
     * @return 
     */
    int getListCount(@Param("condition") AgencyCondition condition);
   /**
    *获取分页列表
    * @author FX
    * @date 2018/10/17 14:01
    * @param condition
    * @return
    */
    List<GeneticTestingAgency> getList(@Param("condition") AgencyCondition condition);
    /**
     *获取所有机构
     * @author FX
     * @date 2018/10/17 16:07
     * @param
     * @return
     */
    List<GeneticTestingAgency> getAll();

    /***
     * 批量获取机构信息
     * @author jcl
     * @date 2018/11/13 14:14
     * @param agencyIds 机构id
     * @return
     */
    List<GeneticTestingAgency> getAgencyByIds(@Param("agencyIds") String[] agencyIds);
    /**
     *批量删除（逻辑）
     * @author FX
     * @date 2019/1/3 17:50
     * @param id
     * @return
     */
    void deleteAgenecyMore(@Param("ids") List<String> id);
    /**
     *根据company获取账户
     * @author FX
     * @date 2019/1/7 19:18
     * @param id
     * @return
     */
    GeneticTestingOperationAccount getAccountByCompanyId(String id);
}